package com.loser.rpc.sale.rpc;

import com.loser.module.base.common.ApiResponse;
import com.loser.rpc.sale.dto.resp.UserBalanceResp;
import com.loser.rpc.sale.fallback.BalanceFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "loser-sale", fallback = BalanceFeignFallBack.class)
@Component
public interface BalanceFeign {

    @GetMapping("/balance/get/{userId}")
    ApiResponse<UserBalanceResp> getByUserId(@PathVariable("userId") Long userId);

}
